The experiment was done in June and July 2017 at La Selva Biological Field Station, Province Heredia, Costa Rica. Male and female individuals of the species Glossophaga commissarisi, were captured from the wild for the experiment. The bats were attracted to a particular location in the forest using sugar-water (see Reward below) as bait and then caught in mist-nets. The bats were sexed and the selected individuals were were then taken to flight cages at another location in the rainforest. These were 4 x 6 m cabins with mesh walls, and thus with the same climactic conditions as the surrounding environment. The bats were weighed, radio frequency identification (RFID) tags were placed around their necks as collars (assigned uniquely to each bat) and released into the flight cages so they could fly within them freely. 4 bats at a time were put into a flight cage. These were called ‘groups’ and all the individuals in a group were of the same sex.
Before the start of the experiment the procedure was tested with 4 females or ‘beta bats’ and refinements were made. The data from these individuals were not analysed. Of the bats that participated in the main experiment, most completed it and a few did not. The bats were released back into the forest upon completing the experiment, or as soon as we noticed they were not consuming a sufficient number of calories to maintain a healthy weight. Prior to release the RFID collars were removed, the bats were weighed to ensure they had not lost too much weight (see Supplementary Information - Table 1 for details). No blinding was done as all the data collection was completely automatized. 14 bats in total (7 males and 7 females) completed the experiment and the data from these animals were analyzed. Animal experimental procedures were reviewed and permission for animal experimentation and RFID-tagging was granted by Sistema Nacional de Areas de Conservación (SINAC) at the Ministerio de Ambiente y Energía (MINAE) Costa Rica.
The reward received by the bats during the experiment was also their main source of food. The reward was a 17% by weight solution of sugar dissolved in water (prepared fresh everyDay), hereafter referred to as ‘nectar’. The sugar consisted of a 1:1:1 mass-mixture of sucrose, fructose and dextrose. The nectar was thus similar in composition and concentration to the nectar produced by wild chiropterophilous plants (Baker et al., 1998).
Each flight cage had a square plastic frame in the center (2x2x1.5m). 8 reward-dispensing devices - hereafter referred to as ‘flowers’ - were fixed in a radial pattern on this frame, two on each side of the square (see Figure 1) with a minimum distance of 40 cm between adjacent flowers. This is known to be a distance discriminable by these bats (Winter and Stich, 2005). Each flower had the following parts:
A single stepper-motor pump was placed in the center of the plastic frame. The pump contained a 25 mL Hamilton glass syringe (Sigma Aldrich) which was connected to the tubing system of the flowers through 5 pinch valves. These pinch valves controlled the flow of liquid from the pump to the system and from a reservoir of liquid to the pump. This reservoir (500 mL thread bottle, Roth, Germany) was filled with fresh nectar every day and connected to the syringe through the valves. The nectar was then pushed by the syringe through the valves into the tubes.
When an RFID-tagged bat approached a flower, the individual RFID number was read by the reader. If the bat then poked its nose into the flower and broke the light barrier, it triggered the release of a reward. The pinch valve opened and the pump moved the correct number of pre-programmed steps to dispense nectar to the head of the flower. The bat could easily hover in front of the flower and lick this up. Only when both events occured, i.e., the RFID reader detected a bat and the light-barrier was broken, would a reward be triggered.
The flowers and the pump were connected to a Lenovo ThinkPad laptop computer, which ran the experimental programs and the programs used to clean and fill the systems: PhenoSoft Control 16, PhenoSoft GmBH, Berlin, Germany. The raw data were also recorded to this computer as comma-separated values (CSV) files.
Figure 1: a) Schematic of the cage and flower set-up b) Pump from Cage 1 c) Pump from Cage 2
Every day at around 10 AM the old nectar was emptied from the system. The system was rinsed and filled with plain water until 3 PM in the afternoon, when it was filled again with fresh nectar. Twice a week the system was filled with 70% ethanol for an hour to guard against fungal growth, then repeatedly rinsed with water.
Each bat was uniquely assigned 2 adjacent flowers on the same side of the square frame, out of the array of 8. These flowers were programmed to reward only 1 of the 4 bats in the cage. After the afternoon procedure of filling the system with fresh nectar was completed, ‘test’ visits were made to the flowers to ensure that they delivered rewards correctly. The program was then left running for the rest of the night for data collection. Thus, the bats could begin visiting the flowers to collect a reward whenever they chose, which was usually around 6 PM in the evening. During the course of the night, when the syringe of the pump had been emptied, the pump re-filled automatically. This process was quite fast, about 3.75 minutes (SD = ±2.23) in Cage 1 and 2.31 minutes (SD = ±0.93) in Cage 2. Notably, during this time the bats could not get rewards, even if they made proper visits to the correct flowers.
Every day the bats were also given ad-libitum supplemental food:3.5g of hummingbird food (NektarPlus, Nekton) in 100 mL of water and 3.5g of milk powder (Nido 1+, Nestle) in 100 mL of water. They were also given a small bowl of locally-sourced bee pollen.
The experiment proceeded through the following stages.
On the night the naive bats were captured and placed into the flight cages they received ad-libitum reward from all the flowers all night long. To enable the bats to find the flowers a small cotton pad soaked in dimethyl disulphide (a chemical attractant produced by many bat-pollinated flowers - von Helversen et al., 2000) was placed on the flowers. A small drop of honey was applied to the inside of the flowers to encourage the bats to place their heads inside, break the light-barrier and trigger a nectar reward. The bats nearly always found the flowers and learned to trigger rewards quickly.
After the bats had learned to trigger rewards, the next stage of training involved assigning the bats uniquely to 2 out of the 8 flowers in the array. This stage was similar to Ad-libitum, except the bats could only trigger a reward at their assigned flowers.
To ensure that the bats were familiar with both flowers assigned to them they went through one final stage of training: forced alternation between the two assigned flowers all night long.
In this serial reversal learning task the bats had to choose between a flower that gave 40 \(\mu\)L of nectar (S+) and one that gave no reward at all (S-). The spatial locations of the two flowers served as the cues indicating which flower was the profitable one. After a bat had made 50 visits in total to the two flowers a reversal occurred: the previously rewarding flower became the non-rewarding flower and vice versa. The batch of 50 visits that occurred between two consecutive reversals (when the location of the S+ and S- stayed constant) was termed a ‘reversal block’, including the first 50 visits of a night when the bats had not experienced any reversal at all that day. This occurred at regular intervals of 50 visits until the bat either stopped making visits or reached a maximum of 300 visits in a night. After the bat had made 300 rewarded visits it could no longer receive a reward that experimental night. There were 5 reversals per night. This stage of the experiment was repeated for 3 nights in a row. Each experimental night was called a ‘Day’. The same flower was the first to be rewarding at the start of every Day. Thus, because there were 6 reversals every night, the last flower to be rewarding on a night was non-rewarding at the start of the next night.
As some of the animals did not complete all six reversal blocks on some of the Days, the same models described below were fit to just the data from the “complete” animals with nearly identical results. Therefore only the models containing all 14 animals, including the “incomplete” ones are presented here.
To quantify the number of perseverative visits made by the bats the number of visits after the occurrence of a reversal made to the previously rewarding option until the first visit to the newly rewarding option were counted. A Bayesian Markov chain Monte Carlo generalized linear mixed model was fit to these data using the package brms, v. 2.14.4 (Bürker, 2017), using a negative-binomial likelihood distribution. Day, reversal block and their interaction were fixed effects and random slopes and intercepts were used to fit regression lines for each individual animal. Weakly informative priors were used: a normal distribution for the slopes and intercepts, a cauchy distribution for the standard deviation. This model had 4 Markov chains with 2000 iterations with a warmup phase of 1000 iterations and a thinning interval of 3.
The visits to the S+ option were modelled as a binomial distribution, with the a visit to the S+ a ‘sucess’ and a visit to the S- a ‘failure’ (1 and 0 respectively). 2 Bayesian Markov chain Monte Carlo generalized linear mixed models were fit to these data as well, both with a binomial likelihood distribution. The first model had day, block, bin and their interactions as fixed effects; random slopes and intercepts were used to fit regression lines for the individuals; 4 Markov chains with 2000 interations and a warmup phase of 1000 interations; and a thinning interval of 3. A second and more complex model was also fit to these data, in order to account for the fact that the first day and the first block of each day were qualitatively different from the others. On the first day the animals had had no prior experience of any reversals, and during the first block of every day they had not experienced any reversals on that day. In addition to day, block and bin as numeric predictor variables, this model also had day and block as factor variables, with the first day and the first block of every day as one level and the other days and other blocks of each day as the other level. This second model too had random slopes and random intercepts for the individuals, 4 Markov chains with 2500 iterations with a warmup phase of 1200 iterations and a thinning interval of 3. The longer chains were necessary for the chains in the more complex model to reach convergence. The two models were then compared using leave-one-out cross-validation, implemented in brms using the package loo, v.2.3.1 (Vehtari et al., 2016).
Visual inspection of the trace plots, the number of effective samples, the Gelman-Rubin convergence diagnostic (Rˆ) and the calculation of posterior predictions for the same clusters were all used to assess the fit of the models. In all of the models the Rˆ was equal to 1 for all the chains.
All statistical analyses were conducted in R, version 4.0.2 (R Core Team, 2020), (do I put in information about my computer here?), and all the plots were also created in R, using the tidyverse set of packages (v. 1.3.0).
All data and analysis code are available online at github repository.
Overall, the vast majority of the bats’ visits were made to whichever flower was the rewarding one in a particular block (Figure2). The general pattern was that, at the start of the each Day, before they had experienced any reversals, the bats made more than 91% (±SD 7) of their visits to the S+; immediately following a reversal, this proportion dropped to 50% and lower. The proportion of visits to the S+ rapidly then climbed back up to approximately 93% (±SD 9) and more after the first bin of 10 visits following a reversal.
It is of note that not all the bats completed every reversal block of every Day. Some animals stopped making visits before finishing the maximum of 300 per Day, and some of those also completed the 300 visits on the subsequent Days. However, every single block had data from at least 10 bats, even if they were not always the same bats. (see Supplementary Figure 1)
Figure 2: Average preferences of the bats for the rewarding option. Points are the average preference of the bats in a single bin consisting of 10 visits per bat. The very first block before the bats experienced any reversals at all is marked with white points, the rest with black points. Shaded areas are 95% confidence intervals
Furthermore, about 1 % (SD = ±0.74) of all visits made by the bats over all 3 Days were not rewarded, even though they were made to the rewarding flowers, due to the fact that they were made during the time the pump had been refilling. These visits were excluded from the following analysis.
As the bats experienced more reversals the largest change was seen in the number of perseverative visits, i.e., the visits made to the flower that was rewarding before the reversal before the first visit to the newly rewarding flower. The analysis showed that both day and block had a significant negative effect on this: as the bats experiences more reversals on more days the number of perseverative visits decreases. The interaction of day and block, however, was positive: the decrease in the number of perseverative visits was smaller as the bats experienced more experimental Days.
Figure 3: Number of perseverative visits made by the individual bats after a reversal. Red lines are data from the individual bats, black lines are the mean number of visits averaged over bats
| Fixed effect | Estimate | 95% Credibility intervals |
|---|---|---|
| Intercept | 3.0393791 | (2.5 , 3.51) |
| Day | -0.5831742 | (-0.83 , -0.33) |
| Block | -0.2733820 | (-0.4 , -0.15) |
| Day-Block Interaction | 0.0996299 | (0.04 , 0.16) |
Figure 4: Plot of slope coefficient values of the fixed effects
Sampling from the posterior distribution and plotting the predictions showed a good fit of the model to the data, and showed the interaction between day and block clearly: on the first Day the slope was strongly negative; by the third Day the slopes were flat, and even slightly positive.
Figure 5: The posterior predictions of the model (blue line), compared with the empirical data from the bats (red line)
should there be a concluding sentence for this section?
Further analyses were done to model as an outcome variable the proportion of visits to the S+ flower. IT is important to note that these were exploratory analyses done after the initial analysis of the perseverative visits was finished, to further illuminate the way the animals’ behaviour changed as they experienced serial reversals.
The first model we fit had Day, block and bin as fixed effects and random slopes and random intercepts for the individual bats. The second model was the same but expanded a little: as the first Day and first block of each day were by design different from the other Days and blocks respectively, predictor variables Day and block were also added as factors with two levels: the first Day and block; and the others. On comparing the two models using leave-one-out cross validation, the model that accounted for the first Day and block had a higher predictive accuracy than the one without (Table 2). The results of the model that accounts for the first Day and block are presented in Figure 6. Day, block and bin variables all had positive slope coefficients, but the interactions of Day and block, block and bin, and Day and bin all had negative slopes. Though the interactions effects were smaller than the main effects, the 95% credibility intervals of the former did not overlap with 0. Thus, the animals’ choice for the S+ increases overall as they experience more and more Days and reversal blocks, and within each reveral block as it progresses, but this ‘improvement’ in their choice for the S+ decreases within each reversal block as it progresses, within each day as more reversals occur, and within each reversal block as the experimental Days progress. Furthermore, the variable ‘block type’, i.e., whether a block was the first reversal block of the Day or not had a significantly positive slope. The bats made more visits to the S+ before they had experienced any reversal at all. While the ‘Day type’ did not seem to affect the proportion of S+ visits, block type and Day type had an interaction effect: the first block of the first Day, before any reversals had ever been experienced even once, had the highest proportion of visits to the S+ compared to any other block on any other Day.
| Model | Difference in LOO estimates | Standard error |
|---|---|---|
| Day and block as both numeric and factor | 0.0000 | 0.00000 |
| Day and block as only numeric | -108.2052 | 14.13952 |
| Fixed effect | Estimate | 95% Credibility intervals |
|---|---|---|
| Intercept | -3.2960866 | (-4.3 , -2.27) |
| Day | 0.9383263 | (0.57 , 1.33) |
| Block | 0.4822631 | (0.33 , 0.63) |
| Day Type 1 | -0.3893580 | (-0.95 , 0.18) |
| Block Type 1 | 1.1983421 | (0.3 , 2.18) |
| Bin | 1.7815207 | (1.35 , 2.22) |
| Day-Block interaction | -0.1332832 | (-0.19 , -0.08) |
| Block-Bin interaction | -0.0893776 | (-0.13 , -0.04) |
| Day-Bin interaction | -0.1843788 | (-0.34 , -0.03) |
| Day Type 1-Block Type 1 interaction | 0.6184034 | (0.17 , 1.05) |
| Block Type 1-Bin interaction | 0.0582480 | (-0.21 , 0.34) |
| Day Type 1-Bin interaction | -0.0942867 | (-0.35 , 0.16) |
Figure 6: The effect of day, block, bin, day type and block type on the proportion of visits to the rewarding option. Plot of intercept and slope coefficient values of the fixed effects
Figure 7 shows the fit of the posterior predicted values of this model to the empirical data from the bats. While the model appears to be a good fit overall, it most notably seems to fail to capture the drop in the proportion of S+ visits in the very first bin following a reversal. It is this however that was analysed explicitly in the model fit to the number of perseverative visits; hence this model of the proportion of visits to the S+ was not further expanded to try capture the behaviour during the first bin of a block.
Figure 7: The posterior predictions of the model (blue line), compared with the empirical data from the bats (red line). Reversals are marked as the dotted line.
Should there be an overall conclusion?
| Individual | Sex | Flight cage | Weight on capture [g] | Weight on release [g] |
|---|---|---|---|---|
| Bat5 | Female | 2 | 9.0 | 8.5 |
| Bat6 | Female | 2 | 8.5 | 8.5 |
| Bat8 | Female | 2 | 8.5 | 8.5 |
| Bat9 | Female | 1 | 8.5 | 8.0 |
| Bat10 | Female | 1 | 8.5 | 8.0 |
| Bat11 | Female | 1 | 9.0 | 8.5 |
| Bat12 | Female | 1 | 10.0 | 9.0 |
| Bat13 | Male | 2 | 8.5 | 8.0 |
| Bat14 | Male | 2 | 9.0 | 8.0 |
| Bat15 | Male | 2 | 9.5 | 8.0 |
| Bat16 | Male | 2 | 10.0 | 9.5 |
| Bat17 | Male | 1 | 10.0 | 8.0 |
| Bat18 | Male | 1 | 10.5 | 8.5 |
| Bat20 | Male | 1 | 9.5 | 8.5 |
Figure S1: All individual choices of the bats for the rewarding and non-rewarding options. The black line is the choice for either the S+ or S-, marked as 1 or 0 on the Y-axis respectively. The red lines indicate when a reversal took place and the purple areas mark the wrongly unrewarded visits
Not all the bats finished all 6 reversal blocks every Day. The sample size of each reversal block along with the average proportion of S+ visits is given in Figure S2.
Figure S2: Average preferences of the bats and the sample size of each block. The first block before the bats experienced any reversals at all is marked with white points, the rest with black points. Shaded areas are 95% confidence intervals
Figure S3 shows the distribution of inter-visit intervals.
Figure S3: Distribution of inter-visit intervals [s]